<%-- 
    Document   : manageUser
    Created on : Jan 11, 2012, 9:27:06 PM
    Author     : omega
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html:html>

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        
        <title></title>
    </head>
    <body>
        <html:form action="/addUser.do?dispatch=domanageUser">
            <div class="content">                   

                <table class="threehead" cellspacing="0">
                    <tr>
                        <td width="96"><div id="linkbuttom"><a href="${pageContext.request.contextPath}/addUser.do?dispatch=doListAddUser">เพิ่มผู้ใช้</a></div></td>
                        <td width="15">|</td>
                        <td width="193"><html:text property="kwKeyWord" size="25"/></td>
                        <td width="466"><html:submit property="btnSearch" value="ค้นหา"/></td>
                    </tr>
                </table>
                <table class="three" cellspacing="0">
                    <tr>
                        <td colspan="7"><strong>แสดงข้อมูลผู้ใช้งานระบบ</strong></td>
                    </tr>
                    <tr>
                        <th>ลำดับ</th>
                        <th>รหัสผู้ใช้</th>
                        <th>คำนำหน้า</th>
                        <th>ชื่อ</th>
                        <th>นามสกุล</th>
                        <th>ประเภท</th>
                        <th>การจัดการ</th>
                    </tr>
                    <logic:iterate id="list" name="manageUserForm" property="userList" indexId="seq">
                        <tr>
                            <td><div align="left">${seq + 1}</div></td>
                            <td><div align="left">${list.useId}</div></td>
                            <td><div align="left">${list.useTitle}</div></td>
                            <td><div align="left"><div id="linkbuttom"><a href="${pageContext.request.contextPath}/addUser.do?dispatch=doPreviewUser&userId=${list.useId}">${list.useFirstName}</a></div></td>
                            <td><div align="left"><div id="linkbuttom"><a href="${pageContext.request.contextPath}/addUser.do?dispatch=doPreviewUser&userId=${list.useId}"><u>${list.useLastName}</u></a></div></td>
                            <td><div align="left">${list.userTypeDesc}</div></td>
                            <td><div id="linkbuttom">
                                    <a href="${pageContext.request.contextPath}/addUser.do?dispatch=doedituser&userId=${list.useId}&mode=edit"><u>แก้ไข</u></a> | 
                                    <a href="${pageContext.request.contextPath}/addUser.do?dispatch=dodeleteuser&userId=${list.useId}" onclick="return confirm('ต้องการลบผู้ใช้งานใช่หรือไม่?');"><u>ลบ</u></a>                                                                       
                                </div>
                            </td>
                        </tr>
                    </logic:iterate>
                </table>    
            </div>

        </html:form>       
    </body>
</html:html>
